﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_BBS_DeleteReplay]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_BBS_DeleteReplay];
GO
CREATE PROCEDURE [dbo].[sproc_BBS_DeleteReplay]
@replayid int,
@itemid int
AS

    DELETE FROM uds_bbs_replay WHERE replay_id=@replayid
--修改回复数减一
    UPDATE uds_bbs_forumItem SET replay_times = replay_times -1 
        WHERE item_id=@itemid